<template>
  <div>
    <mt-header title="入金引導">

      <router-link to="/index" slot="left">

        <mt-button icon="back"></mt-button>
      </router-link>
    </mt-header>

    <!-- tab-container -->
    <div class="title">详细内容</div>
  </div>

</template>

<script>
  import Vue from 'vue';
  import {Header} from 'mint-ui';
  import {cc} from '../../api/cc';
  import {pc} from '../../api/pc';
  import {MessageBox} from 'mint-ui';
  Vue.component(Header.name, Header);
  import {Navbar, TabItem} from 'mint-ui';
  import {TabContainer, TabContainerItem} from 'mint-ui';
  Vue.component(TabContainer.name, TabContainer);
  Vue.component(TabContainerItem.name, TabContainerItem);
  Vue.component(Navbar.name, Navbar);
  Vue.component(TabItem.name, TabItem);


  export default {
    name: "index",
    data() {
      return {
        selected:'1',
        ccList:{} ,
        pcList:{} ,
        userInfo:{}
      }
    },
    methods:{
      getCc(){
        cc({
          uid:this.userInfo.uid
        }).then((data)=>{
          if (data.errorCode==0){
            this.ccList=data.data
          }
        });
      },
      getPc(){
        pc({
          uid:this.userInfo.uid
        }).then((data)=>{
          if (data.errorCode==0){
            this.pcList=data.data.data
          }
        })
      },

    },
    mounted() {
    if (!window.localStorage.getItem('userInfo')){
        this.$router.push({path: '/'})
        } else {
        this.userInfo = JSON.parse(window.localStorage.getItem('userInfo'));
        cc({
            uid:this.userInfo.uid
        }).then((data)=>{
            if (data.errorCode==0){
                this.ccList=data.data
            }
        });
        pc({
            uid:this.userInfo.uid
        }).then((data)=>{
          console.log(data)
            if (data.errorCode==0){
                this.pcList=data.data.data
              console.log(this.pcList)
            }
        })

      }

    },


  }
</script>

<style scoped>
 .title{
   width: 100px;
   height: 100px;
   margin: 10px;
 }

</style>
